package com.dabbo.starship.interfaces;
import java.rmi.Remote;
import java.rmi.RemoteException;

import com.dabbo.starship.shared.CellLocation;


public interface Cell extends Remote {

	public final static int CELL_DEFAULT = 0;
	public final static int CELL_FLOOR = 1;
	public final static int CELL_POWER = 2;
	public final static int CELL_DOOR = 3;
	public final static int CELL_ENGINE = 4;
	public final static int CELL_ENGINE_CORE = 5;
	public final static int CELL_CONSOLE = 6;
	//public final static int CELL_CONSOLE_CONFIG = 7;
	public final static int CELL_BED = 8;
	public final static int CELL_MEDBED = 9;
	public final static int CELL_BATTERY = 10;
	public final static int CELL_CARGO = 11;
	
	// To-do - link to player/NPC object to state what unit is using this
	
	public int getCellType() throws RemoteException;
	
	public int getPowerOutput() throws RemoteException;
	
	public void activate() throws RemoteException;
	public void deActivate() throws RemoteException;

	public Block getParent() throws RemoteException;
	
	public void tick() throws RemoteException;
	
	public boolean isActive() throws RemoteException;
	
	public boolean isPassable() throws RemoteException;
	
	public boolean isCargoAllowed() throws RemoteException;
	
	public void powerFailue() throws RemoteException;
	
	public void setExit(Block parentBlock, CellLocationInterface parentCell, Block linkedBlock, CellLocationInterface linkedCell, boolean callBack) throws RemoteException;
	public Block getExitBlock() throws RemoteException;
	public CellLocationInterface getExitCell() throws RemoteException;

	public void setDoorSecure(boolean secureMode, boolean stopCallBack) throws RemoteException;
	public boolean getDoorSecure() throws RemoteException;
	
	public void setDoorAccessCode(String newDoorAccessCode) throws RemoteException;
	public String getDoorAccessCode() throws RemoteException;	

	public void setThrust(int thrust) throws RemoteException;
	public int getThrust() throws RemoteException;

	public void setConsoleMode(int consoleMode) throws RemoteException;
	public int getConsoleMode() throws RemoteException;
	
	public void setLocation(CellLocation cellLocation) throws RemoteException;
	public CellLocation getLocation() throws RemoteException;
	
	public String getCommandCode() throws RemoteException;
	public boolean setCommandCode(String commandCode, String oldCommandCode) throws RemoteException;
	
	public int getBatteryCharge() throws RemoteException;
	public void setBatteryCharge(boolean changing) throws RemoteException;
	public boolean isCharging() throws RemoteException;
	
	public void setDamage(int damage) throws RemoteException;
	public int getDamage() throws RemoteException;
	
	public int getStorageLimit() throws RemoteException;
	public int getAvailableStorage() throws RemoteException;
	public boolean isCargoHere() throws RemoteException;
	
	public boolean addItem(ItemInterface item) throws RemoteException;	
	public boolean removeItem(int element) throws RemoteException;

	
}
